﻿using System;

public sealed class SomeType {
	// This is a static read-only field; its value is calculated and
	// stored in memory when this class is initialized at run time.
	public static readonly Random s_random = new Random();

	// This is a static read/write field.
	private static Int32 s_numberOfWrites = 0;

	// This is an instance read-only field.
	public readonly String Pathname = "Untitled";

	// This is an instance read/write field.
	private System.IO.FileStream m_fs;

	public SomeType(String pathname) {
		// This line changes a read-only field. 
		// This is OK because the code is in a constructor.
		this.Pathname = pathname;
	}

	public String DoSomething() {
		// This line reads and writes to the static read/write field.
		s_numberOfWrites = s_numberOfWrites + 1;

		// This line reads the read-only instance field.
		return Pathname;
	}
}